package pe.com.bbva.efcap.servidor.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import pe.com.bbva.efcap.servidor.dao.RatingDAO;
import pe.com.bbva.efcap.servidor.modelo.entidad.Rating;

@Repository
public class RatingDAOImpl extends EntidadDAOImpl<Rating> implements RatingDAO{

	private static final long serialVersionUID = 1L;

	@Override
	public List<Rating> obtenerListaRatingPorCodigoCentral(String codigoCentral) {
		String hql = "from "+getEntityClass().getName()+" r "
				+ "where r.codigoCentralCliente = :codigoCentral "
				+ "order by r.idRating ";
		return getSession().createQuery(hql)
				.setString("codigoCentral", codigoCentral).list();
	}

	
}
